Actions After Add, Edit, Save

Redirect to Another Page when Show or Edit Record Page Cannot Retrieve Data

Description
This customization shows how to redirect to another page when Show or Edit Record page cannot retrieve data.
Variables
Record Control
Select the record control class which will contain the customization
Applies to
RecordControl class
Code
 
''' 
''' Override the default behaviour of the LoadData(). 
''' 
Public Overrides Sub LoadData()
    
       
    ' Call MyBase.LoadData()
    MyBase.LoadData()  
	 
	If Me.DataSource Is Nothing Then
		' If no records found then, redirect to the page of your choice
        Me.Page.Response.Redirect("../OtherPages/SomeOtherPage.aspx")        	

    End If
    
End Sub
        
        
     

Terms of Service Privacy Statement